<?php

namespace app\api\controller;

use app\services\HelpCenterService;
use support\Request;

class HelpCenterController
{
    public function getList(Request $request)
    {
        try {
            $page = (int) $request->post('page', 1);
            $pageSize = (int) $request->post('page_size', 10);
            $keyword = $request->post('keyword', null);

            $result = HelpCenterService::getHelpCenterList($page, $pageSize, $keyword);

            return ok_rsp('成功', $result);
        } catch (\Exception $e) {
            return err_rsp($e->getMessage());
        }
    }
}